
#ifndef _ALLOCATOR_H_
#define _ALLOCATOR_H_
namespace share
{

class Allocator
{
public:
	Allocator( Allocator_Impl *impl = 0 );

	~Allocator( void );

	inline void *alloc( size_t size )
	{
		return impl_->alloc( size );
	}

	inline void free( void * block )
	{
		return impl_->free( block );
	}

	Allocator_Impl * impl( ) const;

	void impl( Allocator_Impl *impl );

	void clear( );

private:
	Allocator_Impl *impl_;
	Allocator( const Allocator &allocator );
	Allocator & operator = ( const Allocator &allocator );
};

}
#endif
